<!--
 * @Description: tabbar第2页 求职-消息 or 招聘-找人才
 * @Author: rcc
 * @Date: 2024-08-08 19:03:41
 * @FilePath: /rc-recruitment/pages/tab-page/tab-2/tab-2.vue
-->

<template>
	<!--	求职-消息-->
	<template v-if="showJob">
		<JobNews />
	</template>

	<!--	招聘-找人才-->
	<template v-else>
		<HiringTalent />
	</template>
</template>

<script lang="ts" setup>
import { onLoad, onShow } from "@dcloudio/uni-app";
import { ref } from "vue";
import useTabbar from "@/hooks/use-tabbar.ts";
import { useUserStore } from "@/stores/user.ts";

import JobNews from "@/pages/tab-page/job-news/job-news.vue";
import HiringTalent from "@/pages/tab-page/hiring-talent/hiring-talent.vue";

const { initTabBar } = useTabbar();
const { isJob } = useUserStore();
const showJob = ref(isJob);
onShow(() => {
	const { isJob } = useUserStore();
	showJob.value = isJob;
});
onLoad(() => {
	initTabBar();
});
</script>

<style lang="scss" scoped></style>
